package com.flickx.redis;

import com.flickx.acmq.sms.po.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;

/**
 * @author flick on 2017/4/13.
 * @version 1.0
 */
@Component
public class RedisUtilImpl implements RedisUtil{

    @Autowired
    protected RedisTemplate<?, ?> redisTemplate;

    public void push(Person person){

        ListOperations opsForList = redisTemplate.opsForList();

        opsForList.leftPush(person.getName() +"" ,person.toString());
    }

}
